

using System;
using System.Collections.Generic;
using System.Text;
using EntityLayer;
using System.Data;
using DataAccessLayer;
using InfraStructureLayer;

namespace DataLayer
{
	public class datPhotoAlbumContents
	{
		public datPhotoAlbumContents()
		{
		}
		
		#region  Code Factory Generated Methods
        public void DeletePhotoAlbumContentsByPhotoAlbumContentId(entPhotoAlbumContents parEntPhotoAlbumContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pPhotoAlbumContentId", parEntPhotoAlbumContents.PhotoAlbumContentId);
            parDbConnector.ExecuteNonQuery("DeletePhotoAlbumContentsByPhotoAlbumContentId", insDbParamCollection);
        }
        public void InsertPhotoAlbumContents(entPhotoAlbumContents parEntPhotoAlbumContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pPhotoAlbumId", parEntPhotoAlbumContents.PhotoAlbumId);
            insDbParamCollection.Add("@pLanguageId", parEntPhotoAlbumContents.LanguageId);
            insDbParamCollection.Add("@pPhotoAlbumName", parEntPhotoAlbumContents.PhotoAlbumName);
            insDbParamCollection.Add("@pPhotoAlbumContentDescription", parEntPhotoAlbumContents.PhotoAlbumContentDescription);
            insDbParamCollection.AddOutput("@pPhotoAlbumContentId", DbType.Int32);
            parDbConnector.ExecuteNonQuery("InsertPhotoAlbumContents", insDbParamCollection);
            parEntPhotoAlbumContents.PhotoAlbumContentId = Convert.ToInt32(insDbParamCollection.GetOutPutParameter().Value);
        }
        public void UpdatePhotoAlbumContentsByPhotoAlbumContentId(entPhotoAlbumContents parEntPhotoAlbumContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pPhotoAlbumContentId", parEntPhotoAlbumContents.PhotoAlbumContentId);

            insDbParamCollection.Add("@pPhotoAlbumId", parEntPhotoAlbumContents.PhotoAlbumId);
            insDbParamCollection.Add("@pLanguageId", parEntPhotoAlbumContents.LanguageId);
            insDbParamCollection.Add("@pPhotoAlbumName", parEntPhotoAlbumContents.PhotoAlbumName);
            insDbParamCollection.Add("@pPhotoAlbumContentDescription", parEntPhotoAlbumContents.PhotoAlbumContentDescription);
            parDbConnector.ExecuteNonQuery("UpdatePhotoAlbumContentsByPhotoAlbumContentId", insDbParamCollection);
        }
		#endregion
        public DataTable SelectPhotoAlbumContentsByPhotoAlbumId(entPhotoAlbumContents parEntPhotoAlbumContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pPhotoAlbumId", parEntPhotoAlbumContents.PhotoAlbumId);
            return parDbConnector.ExecuteDataTable("SelectPhotoAlbumContentsByPhotoAlbumId", insDbParamCollection);
        }
        public void DeletePhotoAlbumContentsByPhotoAlbumId(entPhotoAlbumContents parEntPhotoAlbumContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pPhotoAlbumId", parEntPhotoAlbumContents.PhotoAlbumId);
            parDbConnector.ExecuteNonQuery("DeletePhotoAlbumContentsByPhotoAlbumId", insDbParamCollection);
        }
        public DataTable SelectPhotoAlbumContentsByLanguageId(DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pLanguageId", CurrentContext.LanguageId);
            return parDbConnector.ExecuteDataTable("SelectPhotoAlbumContentsByLanguageId", insDbParamCollection);
        }
	}
}